//
//  TruffleTests.m
//  Truffle
//
//  Created by m2sar on 17/03/10.
//  Copyright 2010 isrtream1-svn . All rights reserved.
//

#import "TruffleTests.h"
#import "DAOTruffle.h"
#import "Contact.h"

@implementation TruffleTests

- (void) testContact {
	DAOTruffle * dao = [[DAOTruffle alloc] initWithDatabase:@"./Database.sql"];
	NSString * uuid = @"bobo";
	NSString * pseudo = @"bobo";
	Contact * contact = [[Contact alloc] initContact:uuid :pseudo];
	[dao addContact:contact];
	int initialCount = [[dao getContacts] count];
	[dao removeContact:contact];
	int secondCount = [[dao getContacts] count]; 
	STAssertTrue(initialCount - 1 == secondCount, @"bobo");
	[contact release];
	[dao release];
}

@end
